#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QTimer>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QImage img;
    img.load("E:\\qt_workspace\\img\\rabbit.png");
    ui->picLabel->setPixmap(QPixmap::fromImage(img));

    myTimer = new QTimer;
    connect(myTimer, &QTimer::timeout, this, &MainWindow::on_timeout);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_startButton_clicked()
{
    myTimer->start(1000);
}

void MainWindow::on_timeout()
{
    qInfo("SSSS");
}
